/* Layout */
import Layout from "@/views/layout/Layout";
/* ------------- 亲和力检测 -------------*/
const aTest = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody/aTest")),
    "AffinityTesting"
  );
const aHistory = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody/aHistory")),
    "AffinityTesting"
  );
const aDetail = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody/aDetail")),
    "AffinityTesting"
  );
/* ------------- 亲和力检测(二步法) -------------*/
// const aTsTest = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-two-step/aTest")), "aTest");
// const aTsHistory = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-two-step/aHistory")), "aHistory");
// const aTsDetail = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-two-step/aDetail")), "aDetail");
/* ------------- 亲和力稳态 -------------*/
const stateTest = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-steady-state/aTest")),
    "AffinityHomeostasis"
  );
const stateHistory = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-steady-state/aHistory")),
    "AffinityHomeostasis"
  );
const stateDetail = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-steady-state/aDetail")),
    "AffinityHomeostasis"
  );
/* ------------- 亲和力 - 200 -------------*/
const affinityTwoHundredTest = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-steady-200/aTest")),
    "affinityTwoHundred"
  );
const affinityTwoHundredHistory = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-steady-200/aHistory")),
    "affinityTwoHundred"
  );
const affinityTwoHundredDetail = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-steady-200/aDetail")),
    "affinityTwoHundred"
  );
/* ------------- 亲和力二步法(多组) -------------*/
// const multipleTest = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-multiple-groups/aTest")), "aTest");
// const multipleHistory = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-multiple-groups/aHistory")), "aHistory");
// const multipleDetail = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-multiple-groups/aDetail")), "aDetail");
/* ------------- 亲和力一步法(多组) -------------*/
// const one_multiple = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-one-groups/aTest")), "mTest");
// const one_multipleHistory = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-one-groups/aHistory")), "mHistory");
// const one_multipleDetail = (r) =>
//   require.ensure([], () => r(require("@/views/antibody-one-groups/aDetail")), "mDetail");
/* ------------- 亲和力检测test -------------*/
const antibodyTest = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-test/aTest")),
    "AffinityTest"
  );
const antibodyHistory = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-test/aHistory")),
    "AffinityTest"
  );
const antibodyDetail = (r) =>
  require.ensure(
    [],
    () => r(require("@/views/antibody-test/aDetail")),
    "AffinityTest"
  );
const routerList = [
  // 亲和力检测（一步）
  {
    path: "/antibody",
    component: Layout,
    name: "antibody",
    sort: 3,
    meta: {
      title: "page.affinity",
      icon: "tree",
    },
    children: [
      {
        path: "/antibodyCd",
        component: aTest,
        name: "antibodyCd",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/aHistory",
        component: aHistory,
        name: "aHistory",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/aDetail",
        component: aDetail,
        name: "aDetail",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
  // 亲和力（二步）
  // {
  //   path: "/antibodyATs",
  //   component: Layout,
  //   name: "antibodyAts",
  //   sort: 25,
  //   meta: {
  //     title: "page.affinityTwo",
  //     icon: "template",
  //   },
  //   children: [
  //     {
  //       path: "/antibodyATs",
  //       component: aTsTest,
  //       name: "antibodyATs",
  //       meta: {
  //         title: "page.upload",
  //       },
  //     },
  //     {
  //       path: "/aHistoryATs",
  //       component: aTsHistory,
  //       name: "aHistoryATs",
  //       meta: {
  //         title: "page.history",
  //       },
  //     },
  //     {
  //       path: "/aDetailATs",
  //       component: aTsDetail,
  //       name: "aDetailATs",
  //       hidden: true,
  //       meta: {
  //         title: "page.detial",
  //       },
  //     },
  //   ],
  // },
  // 亲和力
  {
    path: "/antibodyState",
    component: Layout,
    name: "antibodyState",
    sort: 18,
    meta: {
      title: "page.affinityState",
      icon: "users",
    },
    children: [
      {
        path: "/antibodyCdState",
        component: stateTest,
        name: "antibodyCdState",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/aHistoryState",
        component: stateHistory,
        name: "aHistoryState",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/aDetailState",
        component: stateDetail,
        name: "aDetailState",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
  // 亲和力 200
  {
    path: "/affinityTwoHundred",
    component: Layout,
    name: "AffinityTwoHundred",
    sort: 35,
    meta: {
      title: "page.affinityTwoHundred",
      icon: "eye",
    },
    children: [
      {
        path: "/affinityTwoHundredTest",
        component: affinityTwoHundredTest,
        name: "AffinityTwoHundredTest",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/affinityTwoHundredHistory",
        component: affinityTwoHundredHistory,
        name: "AffinityTwoHundredHistory",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/Affinity200",
        component: affinityTwoHundredDetail,
        name: "AffinityTwoHundredDetail",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
  // 亲和力一步多组
  // {
  //   path: "/onemultiple",
  //   component: Layout,
  //   name: "onemultiple",
  //   sort: 28,
  //   meta: {
  //     title: "page.affinityOneMultiple",
  //     icon: "activity",
  //   },
  //   children: [
  //     {
  //       path: "/onemultipleCdState",
  //       component: one_multiple,
  //       name: "onemultipleCdState",
  //       meta: {
  //         title: "page.upload",
  //       },
  //     },
  //     {
  //       path: "/onemultipleState",
  //       component: one_multipleHistory,
  //       name: "onemultipleState",
  //       meta: {
  //         title: "page.history",
  //       },
  //     },
  //     {
  //       path: "/onemultipleDetail",
  //       component: one_multipleDetail,
  //       name: "onemultipleDetail",
  //       hidden: true,
  //       meta: {
  //         title: "page.detial",
  //       },
  //     },
  //   ],
  // },
  // 亲和力二步法（多组）
  // {
  //   path: "/multipleStateTwo",
  //   component: Layout,
  //   name: "multipleStateTwo",
  //   sort: 27,
  //   meta: {
  //     title: "page.affinityStateMultiple",
  //     icon: "shiyan4",
  //   },
  //   children: [
  //     {
  //       path: "/multipleCdState",
  //       component: multipleTest,
  //       name: "multipleCdState",
  //       meta: {
  //         title: "page.upload",
  //       },
  //     },
  //     {
  //       path: "/multipleState",
  //       component: multipleHistory,
  //       name: "multipleState",
  //       meta: {
  //         title: "page.history",
  //       },
  //     },
  //     {
  //       path: "/multipleDetail",
  //       component: multipleDetail,
  //       name: "multipleDetail",
  //       hidden: true,
  //       meta: {
  //         title: "page.detial",
  //       },
  //     },
  //   ],
  // },
  // 亲和力test
  {
    path: "/antibodyTest",
    component: Layout,
    name: "antibodyTest",
    sort: 12,
    meta: {
      title: "page.affinityT",
      icon: "code",
    },
    children: [
      {
        path: "/antibodyCdT",
        component: antibodyTest,
        name: "antibodyCdT",
        meta: {
          title: "page.upload",
        },
      },
      {
        path: "/aHistoryT",
        component: antibodyHistory,
        name: "aHistoryT",
        meta: {
          title: "page.history",
        },
      },
      {
        path: "/aDetailT",
        component: antibodyDetail,
        name: "aDetailT",
        hidden: true,
        meta: {
          title: "page.detial",
        },
      },
    ],
  },
];

export default routerList;
